﻿using FluentValidation;
using Nop.Admin.Models.XJ;
using Nop.Core.Domain.XJ;
using Nop.Data;
using Nop.Web.Framework.Validators;

namespace Nop.Admin.Validators.XJ
{
	public partial class PlaceValidator : BaseNopValidator<PlaceModel>
	{
		public PlaceValidator(IDbContext dbContext)
		{
			RuleFor(x => x.Name).NotEmpty().WithMessage("名称不能为空");

			SetDatabaseValidationRules<XJPlace>(dbContext);
		}
	}
}